<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    
    <link rel="stylesheet" href="<s:url value="/resources"/>/css/innerstyle.css" type="text/css" />
    <link rel="stylesheet" type="text/css" media="screen" href="<s:url value="/resources"/>/css/custom-theme/jquery-ui.custom.min.css" />	
	<script type="text/javascript" src="<s:url value="/resources"/>/js/jquery-1.7.2.min.js"></script>
	<script type="text/javascript" src="<s:url value="/resources"/>/js/jquery-ui.custom.min.js"></script> 
	<script type="text/javascript" src="<s:url value="/resources"/>/js/i18n/jquery.ui.datepicker-zh-CN.js"></script>	
	<script type="text/javascript" src="<s:url value="/resources"/>/js/jquery.form.js"></script>
	<script type="text/javascript" src="<s:url value="/resources"/>/js/json2.js"></script>
	<script type="text/javascript" src="<s:url value="/resources"/>/js/jquery.validate.min.js"></script>
<style type="text/css">
html,body {
	margin: 0;
	padding: 0;
	font-size: 85%;
}

#tab {
	width: 99%;
	border: #F4F4F4 solid 4px;
	padding: 0 2px 3px 2px;
	margin: 10px 0 0 0;
	float: left;
}

#tab h1 {
	display: block;
	width: 95%;
	height: 65px;
	float: center;
	text-align: center;
	padding-top: 20px;
}

#tab h1 span {
	width: 250px;
	font: bold 26px/55px Arial, Helvetica, sans-serif;
	color: #327C8E;
	background-color: #fff;
	display: block;
}

.content1 {
	margin: 0px;
	padding: 0px;
	width: 100%;
	font-size: 12px;
}

.content1 td {
	height: 16px;
	line-height: 16px;
	text-align: left;
	border-top-style: none;
	border-left-style: none;
	border-right-style: none;
	border-bottom-style: none;
}

.textbox {
	width: 90px;
	border: #000 1px solid;
}

.textboxs {
	width: 70px;
	border: #000 1px solid;
}

.longtextbox {
	width: 180px;
	border: #000 1px solid;
}

.shorttextbox {
	width: 50px;
	border: #000 1px solid;
}

.shorttextbox1 {
	width: 50px;
	border: #000 1px solid;
	background-color: #ddd;
}

.textarea {
	overflow: auto;
	border: #000 1px solid;
}

.select div {
	border: 1px solid #000;
	float: left;
}

label {
	display: block;
}

fieldset {
	padding: 0;
	border: 0;
	margin-top: 25px;
}

label.error {
	color: red; /*错误信息的颜色*/
}

input.error {
	border: 1px dotted red; /*输入错误的输入框的边框样式*/
}
</style>
<script type='text/javascript'>
      //var d$ = dwr.util.byId;

    $(function(){
        $("#but1").button();
        $("#but2").button();
        $("#but3").button();     
		tj(); 
		    
    });
    
    
	
	function tj(){	
		   $("#but1").click(function(){		    
		        var url = "<s:url value="/"/>/htgl/modifyYdht";
		         $("#form1").ajaxSubmit({
		              url:url,
		              type:'post',
		              success:function(data){
		              var json =eval('(' + data + ')');
					    if(json.result==1){
					    alert("修改成功，请【提报】中心审核！");
					    window.returnValue=1;
                        window.close();					   
					   }else{
					    alert("修改失败！");
					    window.returnValue=1;
                        window.close();
					   }
		              }
		         });
		       	          
		     
		       });
		       
		       
		       
		       $("#but2").click(function(){		        
		        var url = "<s:url value="/"/>/htgl/modifyAndSubmitYdht";
		         $("#form1").ajaxSubmit({
		              url:url,
		              type:'post',
		              success:function(data){
		              var json =eval('(' + data + ')');
					    if(json.result==1){
					    alert("提报成功！");
					    window.returnValue=1;
                        window.close();					   
					   }else{
					    alert("保存失败！");
					    //window.returnValue=1;
                        //window.close();
					   }
		              }
		         });
		        
		       });
	  
	  }	
	</script>

</head>

<body>

	<div id="tab">
		<h1>煤炭交易合同 </h1>
		<form name="form1" id="form1">
			<table id="list_search" cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td>出卖人（销方）:</td>
					<td>
						${htinfo.chumdwmc}
					</td>
					<td>企业合同号:</td>
					<td>${htinfo.hetlrbh}</td>
					<td>发站:</td>
					<td>

						${htinfo.fazmch}
						
					</td>
				</tr>

				<tr>
					<td>买受人（购方）:</td>
					<td>
					${htinfo.maisdwmc}
					</td>
					<td>签约地点:</td>
					<td>中国(太原)煤炭交易中心</td>
					<td>到站:</td>
					<td>
						${htinfo.daozmch}
					</td>
				</tr>

				<tr>
					<td>合同形式:</td>
					<td>
						${htinfo.hetxsname}
					</td>
					<td>价格类型:</td>
					<td>
						${htinfo.jiaglxmc}
					</td>					
					<td>隶属行业:</td>
					<td>
						${htinfo.hangylsname}
					</td>
				</tr>

				<tr>
					<td>发货单位:</td>
					<td>${htinfo.fahdwmc}</td>
					<td>合同原价格:</td>
					<td>
						<span style="color: red;font-size:20px;vertical-align:middle;">${htinfo.yuanjg}</span>(元/吨)
					</td>
					<td>签订时间:</td>
					<td>${htinfo.qianysj}
					</td>

				</tr>
				<tr>
					<td>到达省市:</td>
					<td>${htinfo.daodssdmc}</td>
					<td></td>
					<td></td>
					<td></td>
					<td></td>

				</tr>
				<tr>
					<td colspan="6" style="padding-top:5px;">一、收货人名称、品种规格、数量、单价</td>
				</tr>
				<tr>
					<td colspan="6" style="padding:1px;">
						<table id="changdi" align="center" cellpadding="0" cellspacing="0"
							class="content_gridview" border="1">
							<thead>
								<tr>
									<th rowspan="3">收货人名称</th>
									<th rowspan="3">品种规格</th>
									<th rowspan="3">质量指标</th>
									<th rowspan="3">价格<br />(元/吨)</th>
									<th colspan="13">交（提）货时间、煤量（吨）</th>
								</tr>
								<tr>
									<th rowspan="2">全年合计</th>
									<th colspan="3">一季度</th>
									<th colspan="3">二季度</th>
									<th colspan="3">三季度</th>
									<th colspan="3">四季度</th>
								</tr>
								<tr>
									<th>1</th>
									<th>2</th>
									<th>3</th>
									<th>4</th>
									<th>5</th>
									<th>6</th>
									<th>7</th>
									<th>8</th>
									<th>9</th>
									<th>10</th>
									<th>11</th>
									<th>12</th>
								</tr>
							</thead>
							<tbody>
									<tr>
										<td>${htinfo.shouhdwmc}</td>
										<td>${htinfo.pinzgg}</td>
										<td>${htinfo.zhilzb}</td>
										<td><input id="jiag" type="text"
											class="shorttextbox" name="jiag"
											value="<fmt:formatNumber value="${htinfo.jiag}" pattern="###.##"/>" />											
										</td>
										<td><fmt:formatNumber value="${htinfo.shul}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml1}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml2}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml3}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml4}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml5}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml6}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml7}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml8}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml9}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml10}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml11}" pattern="###"/>
										</td>
										<td><fmt:formatNumber value="${htinfo.gml12}" pattern="###"/>
										</td>
									</tr>
							</tbody>
						</table>
					</td>
				</tr>			
				<tr>
					<td colspan="6">
						<table id="httk" cellpadding="0" cellspacing="0" border="0"
							class="content1">
                            <c:forEach var="tk" items="${djtk}">
								<tr>
									<td width="400px">${tk.xh}${tk.biaot}</td>
									<td style="width:86%;height:30px"><div>${tk.neir}</div></td>									
								</tr>
							</c:forEach>
						</table>
					</td>
				</tr>
				<tr>
					<td colspan="6">
						<table cellpadding="0" cellspacing="0" style="width:100%"
							class="content_gridview" border="1">
							<thead>
								<tr>
									<th colspan="2">出卖人</th>
									<th colspan="2">买受人</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>
										<table cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>出卖人名称(章)：</td>
												<td>${htinfo.chumdwmc}
												</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.chumdwdz}
												</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.chumdwfddbr}
												</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.chumdwwtdlr}
												</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.chumdwdh}
												</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.chumdwcz}
												</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.chumdwyzbm}
												</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.chumdwkhyh}
												</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.chumdwzh}
												</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.chumdwnsrdjh}
												</td>
											</tr>

										</table>
									</td>
									<td><table cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>出卖人结算单位名称(章)：</td>
												<td>
													${htinfo.chumdwjsrmc}
												</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.chumdwjsrdz}
												</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.chumdwjsrfddbr}
												</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.chumdwjsrwtdlr}
												</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.chumdwjsrdh}
												</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.chumdwjsrcz}
												</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.chumdwjsryzbm}
												</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.chumdwjsrkhyh}
												</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.chumdwjsrzh}
												</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.chumdwjsrnsrdjh}
												</td>
											</tr>

										</table></td>
									<td><table cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>买受人名称(章)：</td>
												<td>${htinfo.maisdwmc}
												</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.maisdwdz}
												</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.maisdwfddbr}
												</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.maisdwwtdlr}
												</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.maisdwdh}
												</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.maisdwcz}
												</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.maisdwyzbm}
												</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.maisdwkhyh}
												</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.maisdwzh}
												</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.maisdwnsrdjh}
												</td>
											</tr>

										</table></td>
									<td><table cellpadding="0" cellspacing="0" border="0"
											class="content1">
											<tr>
												<td>买受人结算单位名称(章)：</td>
												<td>
													${htinfo.maisdwjsrmc}
												</td>
											</tr>
											<tr>
												<td>住 所:</td>
												<td>${htinfo.maisdwjsrdz}
												</td>
											</tr>
											<tr>
												<td>法定代表人:</td>
												<td>${htinfo.maisdwjsrfddbr}
												</td>
											</tr>
											<tr>
												<td>委托代理人:</td>
												<td>${htinfo.maisdwjsrwtdlr}
												</td>
											</tr>
											<tr>
												<td>电 话:</td>
												<td>${htinfo.maisdwjsrdh}
												</td>
											</tr>
											<tr>
												<td>传真:</td>
												<td>${htinfo.maisdwjsrcz}
												</td>
											</tr>
											<tr>
												<td>邮政编码:</td>
												<td>${htinfo.maisdwjsryzbm}
												</td>
											</tr>
											<tr>
												<td>开户银行:</td>
												<td>${htinfo.maisdwjsrkhyh}
												</td>
											</tr>
											<tr>
												<td>帐号:</td>
												<td>${htinfo.maisdwjsrzh}
												</td>
											</tr>
											<tr>
												<td>纳税人登记号:</td>
												<td>${htinfo.maisdwjsrnsrdjh}
												</td>
											</tr>

										</table></td>

								</tr>
							</tbody>
						</table>
					</td>

				</tr>
				<tr>
					<td colspan="4"><font size="2" color="#FF0000"></font></td>
					<td align="right">        
                      <font size="2" >年度：</font>
                      ${htinfo.nianf}        
                    </td>
					<td align="right">					
					<font size="2">合同有效期：${htinfo.youxqxkssj} 至 ${htinfo.youxqxjssj} </font></td>
							
				</tr>
				
				<tr>
					<td colspan="6" align="center"><input id="but1" type="button"
						name="" value="保存" /> &nbsp;&nbsp;&nbsp; <input id="but2"
						type="button" name="" value="保存并提报" />&nbsp;&nbsp;&nbsp;<input
						id="but3" type="button" name="" value="关闭"
						onClick="window.returnValue=1;window.close();" /></td>
				</tr>
			</table>
			<input type="hidden" name="sysid" value="${htinfo.sysid}">
			<input type="hidden" name="hetid" value="${htinfo.hetid}">
			<input type="hidden" name="dongzlx" value="3"> <input
				type="hidden" name="dongzbm" value="23">
		</form>
	</div>

	
	<div id="dialog-confirm" title="是否确认提交？"></div>
</body>
</html>

